<?php

$Errors = array();

if($_POST[task] == 'newuser')
{  require_once  __CFG_PATH_LIBS . __CFG_PATH_CORE."mail.php";
  makeUserRegistration($Errors);
  if(isEmptyArr($Errors))
  {
  	go_to($BaseURL."login".$CONFIG['webPageFileType']);
  	exit;
  }
}

if(isEmptyArr($_POST))
{  $_POST = $USER['info'];
}
if($_POST['birth_date'] == '')
{  $_POST['birth_date'] = "--";
}
$ErrorMessages = array();
foreach($Errors as $n => $error)
{
  $ErrorMessages[] = $ERRORS['user'][$error];
}
$tpl->assign("ErrorMessages", $ErrorMessages);
$tpl->assign("task", $_POST['task']);

$tpl->assign("PageTitle", $language['user']['registration']);

$_BODY_SMARTY_TEMPLATE = $CONFIG['ModulesFolder']."module.registration.tpl";

?>